<!DOCTYPE html>
    <html>
    <head>
        <meta charset="UTF-8">
        <title>electron-cpp</title>
        <style>
</style>
        
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/markdown.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/highlight.css">
<style>
            body {
                font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', system-ui, 'Ubuntu', 'Droid Sans', sans-serif;
                font-size: 14px;
                line-height: 1.6;
            }
        </style>
        <style>
.task-list-item { list-style-type: none; } .task-list-item-checkbox { margin-left: -20px; vertical-align: middle; }
</style>
        
        
        
    </head>
    <body class="vscode-body vscode-light">
        <h1 id="electron-cpp">electron-cpp</h1>
<p>A simple app that demonstrates the use of Electron as Front-End and C ++ DLLs as Back-End.</p>
<p><strong>Clone and run for a quick way to see Electron in action.</strong></p>
<p>This is a minimal Electron application based on the <a href="https://electronjs.org/docs/tutorial/quick-start">Quick Start Guide</a> within the Electron documentation.</p>
<p><strong>Use this app along with the <a href="https://electronjs.org/#get-started">Electron API Demos</a> app for API code examples to help you get started.</strong></p>
<p>A basic Electron application needs just these files:</p>
<ul>
<li><code>package.json</code> - Points to the app's main file and lists its details and dependencies.</li>
<li><code>main.js</code> - Starts the app and creates a browser window to render HTML. This is the app's <strong>main process</strong>.</li>
<li><code>index.html</code> - A web page to render. This is the app's <strong>renderer process</strong>.</li>
</ul>
<p>You can learn more about each of these components within the <a href="https://electronjs.org/docs/tutorial/quick-start">Quick Start Guide</a>.</p>
<h2 id="requirements">Requirements</h2>
<ul>
<li><a href="https://nodejs.org/en/download/">Node.js</a> (&gt;= 10.x)</li>
<li><a href="https://cmake.org/download/">CMake</a> (&gt;= 3.15)</li>
</ul>
<h2 id="to-use">To Use</h2>
<p>To clone and run this repository you'll need <a href="https://git-scm.com">Git</a> and <a href="https://nodejs.org/en/download/">Node.js</a> (which comes with <a href="http://npmjs.com">npm</a>) installed on your computer. From your command line:</p>
<pre><code class="language-bash"><div><span class="hljs-comment"># Clone this repository (and its submodules)</span>
git <span class="hljs-built_in">clone</span> --recursive https://github.com/akab/electron-cpp.git
<span class="hljs-comment"># Go into the repository</span>
<span class="hljs-built_in">cd</span> electron-cpp
<span class="hljs-comment"># Go into submodule</span>
<span class="hljs-built_in">cd</span> Nodejs-Napi-Addon-Using-Cmake
<span class="hljs-comment"># Install submodule dependencies</span>
npm install
<span class="hljs-comment"># Move to root</span>
<span class="hljs-built_in">cd</span> ..
<span class="hljs-comment"># Install dependencies</span>
npm install
<span class="hljs-comment"># Run the app</span>
npm start
</div></code></pre>
<h2 id="to-deploy-the-application">To deploy the application</h2>
<pre><code class="language-bash"><div><span class="hljs-comment"># Go into the repository</span>
<span class="hljs-built_in">cd</span> electron-cpp
<span class="hljs-comment"># Run Make</span>
npm run make
</div></code></pre>
<p>This will produce <code>electron-cpp.exe</code> in <code>.\out\electron-cpp-win32-x64</code></p>
<p>Note: If you're using Linux Bash for Windows, <a href="https://www.howtogeek.com/261575/how-to-run-graphical-linux-desktop-applications-from-windows-10s-bash-shell/">see this guide</a> or use <code>node</code> from the command prompt.</p>
<h2 id="based-on">Based on</h2>
<ul>
<li><a href="https://github.com/electron/electron-quick-start">electron/electron-quick-start</a> - a very basic starter Electron app</li>
<li><a href="https://gauriatiq.medium.com/c-native-addon-independent-of-node-js-version-using-napi-node-addon-api-and-cmake-53315582cbd1">Electron App with C++ backend as Native Addon (Napi)</a> - a complete example</li>
<li><a href="https://www.electronforge.io/">https://www.electronforge.io/</a> - how to deploy the application</li>
</ul>
<h2 id="resources-for-learning-electron">Resources for Learning Electron</h2>
<ul>
<li><a href="https://electronjs.org/docs">electronjs.org/docs</a> - all of Electron's documentation</li>
<li><a href="https://electronjs.org/community#boilerplates">electronjs.org/community#boilerplates</a> - sample starter apps created by the community</li>
<li><a href="https://github.com/electron/electron-quick-start">electron/electron-quick-start</a> - a very basic starter Electron app</li>
<li><a href="https://github.com/electron/simple-samples">electron/simple-samples</a> - small applications with ideas for taking them further</li>
<li><a href="https://github.com/electron/electron-api-demos">electron/electron-api-demos</a> - an Electron app that teaches you how to use Electron</li>
<li><a href="https://github.com/hokein/electron-sample-apps">hokein/electron-sample-apps</a> - small demo apps for the various Electron APIs</li>
</ul>
<h2 id="license">License</h2>
<p><a href="LICENSE.html">CC0 1.0 (Public Domain)</a></p>

    </body>
    </html>